package com.sc.VenusQueryBeta.adapter;

import android.content.Context;
import android.util.Log;
import android.view.ViewGroup;

import com.sc.VenusQueryBeta.R;
import com.wenld.wenldbanner.helper.Holder;
import com.wenld.wenldbanner.helper.ViewHolder;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 27/11/2018.
 *
 */

public class BannerAdapter {
//    public static List<String> datas;
//    public static List<String> datas2;
    public static Holder<String> holder;
    public static int[] indicatorGrouop;
    public static int[] bgColors;
    public static int[] indicatorColors;

    static {
//        datas = new ArrayList<>();
//        datas2 = new ArrayList<>();
//        datas.add("http://img2.duitang.com/uploads/item/201207/19/20120719132725_UkzCN.jpeg");
//        datas.add("http://img4.duitang.com/uploads/item/201404/24/20140424195028_vtvZu.jpeg");
////        datas.add("第三个");
//
//        datas2.add("datas 2第一个");
//        datas2.add("datas 2第二个");
//        datas2.add("datas 2第三个");
//        datas2.add("datas 2第四个");
//        datas2.add("datas 2第五个");
//        datas2.add("datas 2第六个");

        bgColors = new int[]{0xff66cccc, 0xffccff66, 0xffff99cc};
        indicatorColors = new int[]{0xff993366, 0xffffff66, 0xff666633};

        holder = new Holder<String>() {
            @Override
            public ViewHolder createView(Context context, ViewGroup parent, int pos, int viewType) {
                return ViewHolder.createViewHolder(context, parent, R.layout.layout_banner, getViewType(pos));
            }

            @Override
            public void UpdateUI(Context context, ViewHolder viewHolder, int position, String data){
                viewHolder.setNetImage(R.id.iv_channel,data);
            }

            @Override
            public int getViewType(int position) {
                return 0;
            }
        };

        indicatorGrouop = new int[]{R.drawable.circle_banner_dic, R.drawable.banner_h};
    }
}
